#ifndef _DATA_STRUCT_H
#define _DATA_STRUCT_H
#include "common.h"
#include <sys/socket.h>
#include <arpa/inet.h>
#include <time.h>
#include <sys/time.h>
#include <pthread.h>

#define REGISTER 0
#define KEEPLIVE 1
#define DATA 2

typedef struct node
{
	char user_name[20];
	struct sockaddr_in user_addr;
	int fd;
	char *time;
	struct node *next;
}User;

typedef struct link_head
{
	User *head;
}Link_head;

typedef struct message
{
	int type;
	char fromuser[20];
	char touser[20];
	char data[100];
}Message;

#endif
